<!--  -->
<template>
  <div class='EnergyStatistics'>
    <!-- 统计 -->
    <h1 class='statistical'>生产在线监测</h1>
    <!-- 时间 -->
    <div class='time'>
        <span>选择核算单位</span>
        <template>
        <el-select v-model="value_time" placeholder="" size='mini'>
        <el-option
        v-for="item in options_time"
        :key="item.value"
        :label="item.label"
        :value="item.value">
        </el-option>
        </el-select>
        </template> 
    </div>
    <!-- 图表 -->
    <div class='ec clearfix'>
      <div class='ec_left'>
        <div class='title'>
          <p>当前连续24h能源费用占比</p>
        </div>
        <ECl width='467px' height='364px' :data='d2'></ECl>        
      </div>
      <div class='ec_right'>
        <div class='title'>
          <p>
            <span :class='{active:tabactive===1}' @click='tabactive=1'>蒸汽负荷情况</span>
            <span :class='{active:tabactive===2}' @click='tabactive=2'>实时用汽情况</span>
          </p>
        </div>
        <div class='title-b' v-show="tabactive===1">
          <span>实时功率：{{1200}}kW</span>
          <span>当前连续24h总用电量：{{10000}}kwh</span>          
        </div>          
        <div class='title-b' v-show="tabactive===2">
          <span>瞬时流量：{{8.98}}t/h</span>
          <span>当前连续24h总用汽量：{{25.7}}t</span>          
        </div>     
        <ECr width='474px' height='328px' :data='d2' ></ECr>  
      </div>
    </div>

    <div class='ec_bottom'>
        <div class='title'>
          <p>电力系统-功率曲线</p>
        </div>
        <ECb1 width='970px' height='320px' :data='d2'></ECb1>        
      </div>
    <div class='ec_bottom'>
        <div class='title'>
          <p>热力系统-流量曲线</p>
        </div>
        <ECb2 width='970px' height='320px' :data='d'></ECb2>        
      </div>
  </div>
</template>

<script>
import echarts from "echarts";
import ECl from "./EC_l";
import ECr from "./EC_r";
import ECb1 from "./EC_b1";
import ECb2 from "./EC_b2";

import "./index.scss";
export default {
 components:{
    ECl,
    ECr,
    ECb1,
    ECb2
  },
  data() {
    return {
       tabactive:1,      
       d2: [
        { name: "#1配电室" },
        { name: "#2配电室" }
      ],
       d: [
        { name: "#1配电室" },
      ],
      radio_value: 2,
      // 日月年
      options_time: [
        {
          value: 1,
          label: "日"
        },
        {
          value: 2,
          label: "月"
        },
        {
          value: "3",
          label: "年"
        }
      ],
      value_time: 1
    };
  },
  created() {},
  mounted() {
  },
  beforeDestroy() {
  },
  methods: {
  }
};
</script>

<style lang='scss' scoped>
.EnergyStatistics {
  width: 990px;
  background: #f5f5f5;
  margin: 0 auto;
  .statistical {
    color: #333;
    font-size: 20px;
    padding: 10px 0;
  }
  .time {
    width: 100%;
    height: 54px;
    line-height: 54px;
    background: #fff;
    span {
      font-size: 14px;
      color: #333;
      padding: 0 10px;
    }
  }
  // 图表
  .ec_bottom{
     width: 990px;
     height: 401px;
     margin: 10px 0;
     background: #fff;
     padding: 0 10px;
     box-sizing: border-box;
    .title {
        border-bottom: 1px solid #e9e9e9;
        color: #333;
        font-size: 16px;
        padding: 20px 10px;
        margin-bottom: 20px;
      }
  }
  .ec {
    margin: 10px 0;
    .ec_left {
      width: 487px;
      height: 444px;
      float: left;
      background: #fff;
      padding: 0 10px;
      box-sizing: border-box;
      .title {
        border-bottom: 1px solid #e9e9e9;
        color: #333;
        font-size: 16px;
        padding: 20px 10px;
        margin-bottom: 20px;
      }
    }
    .ec_right {
      width: 494px;
      height: 444px;
      float: right;
      background: #fff;
      padding: 0 10px;
      box-sizing: border-box;
      .title-b{
        color: #333;
        font-size: 16px;
        padding: 0px 10px;
        margin-bottom: 20px;
        span{
          margin-right: 20px;
        }        
      }
      .title {
        border-bottom: 1px solid #e9e9e9;
        color: #333;
        font-size: 16px;
        padding: 20px 10px;
        margin-bottom: 20px;
        span{
          padding-bottom: 16px;
          margin-right: 30px
        }
        .active{
          border-bottom:2px solid #0780ED;
          color:#0780ED;
        }
      }
    }
  }
}
</style>